package com.xs.designpattern;

import lombok.extern.slf4j.Slf4j;

/**
 * 访客军士
 * @author xs
 */

@Slf4j
public class SergeantVisitor implements UnitVisitor{
    @Override
    public void visit(Soldier soldier) {
        // Do nothing
    }

    /**
     * 军士访客方法
     * @param sergeant 待拜访的军士
     */
    @Override
    public void visit(Sergeant sergeant) {
        log.info("您好 {}", sergeant);
    }

    @Override
    public void visit(Commander commander) {
        // Do nothing
    }
}
